<table class="table table-striped table-hover">
	<thead>
		<tr>
			<td colspan="4"><a href="" class="btn btn-primary"><i class="icon-print"></i> Print</a></td>
		</tr>
		<tr>
			<td>STUDENT ID</td>
			<td>STUDENT NAME</td>
			<td>DATE ENROLLED</td>
			<td>GENDER</td>
		</tr>
	</thead>
			<!-- Loop grade level start -->
			<?foreach($sml as $k => $v):?>
				<tbody>
					<thead>
						<tr>
							<td colspan="4"><?=$v['level'];?></td>
						</tr>
					</thead>
				<!-- Loop grade level sections start -->
				<?if(!empty($v['data'])):?>
					<?if(!empty($v['data'])):?>	
						<!-- Loop grade level section students start -->
						<?foreach($v['data'] as $dk => $dv):?>
									<tr class="success">
										<td colspan="4" class="center" ><?=$dv['section_name'];?></td>
									</tr>
							<?if(!empty($dv['students'])):?>
								<?foreach($dv['students'] as $stud):?>
									<tr>
										<td><?=$stud->e_student_id;?></td>
										<td><a href="<?=site_url('profile/student/'.$stud->enrollment_id);?>" class="" target="_blank"><?=$stud->fullname;?></a></td>
										<td><?=$stud->regdate;?></td>
										<td><?=$stud->gender;?></td>
									</tr>
								<?endforeach;?>
							<?else:?>
								<tr>
									<td colspan="4">No Students.</td>
								</tr>
							<?endif;?>
						<!-- Loop grade level section students end-->
						<?endforeach;?>
					<?else:?>
						<tr><td colspan="4">No Students.</td></tr>
					<?endif?>
				<!-- Loop grade level sections end -->
				<?else:?>
					<tr><td colspan="4">There are no sections for this grade Level</td></tr>
				<?endif;?>
				</tbody>
			<!-- Loop grade level start -->
			<?endforeach;?>
		</tbody>
</table>